package com.eshipenet.shipnet.equipmentextbuilder
import play.api.libs.json.{JsValue, Json}

case class DebeziumEncoderInsert(after: JsValue) {
  def toJson: JsValue = Json.obj(
    "schema" -> Json.obj(),
    "payload" -> Json.obj(
      "op"    -> "i",
      "after" -> after,
    )
  )
}
case class DebeziumEncoderUpdate(before: JsValue, after: JsValue) {
  def toJson: JsValue = Json.obj(
    "schema" -> Json.obj(),
    "payload" -> Json.obj(
      "op"     -> "i",
      "before" -> before,
      "after"  -> after,
    )
  )
}
case class DebeziumEncoderDelete(before: JsValue) {
  def toJson: JsValue = Json.obj(
    "schema" -> Json.obj(),
    "payload" -> Json.obj(
      "op"     -> "i",
      "before" -> before,
    )
  )
}
